package Vista;

import Controlador.CPrincipal;
import javax.swing.JFileChooser;
import org.jdesktop.application.Action;

public class VPrincipal extends javax.swing.JFrame {
    CPrincipal control;

    public VPrincipal(CPrincipal c) {
        this.control = c;
        initComponents();
        //this.setEParametros(false);
    }

    @Action
    public void ex1() {
        JFileChooser fc = createFileChooser("Selecciona el archivo de destinos");
        int option = fc.showOpenDialog(this);
        if(option != JFileChooser.CANCEL_OPTION) {
            if(fc.getSelectedFile().exists()) {
                this.tx1.setText(fc.getSelectedFile().getName());
                control.setArchivo(1, fc.getSelectedFile());
            }
        }
    }

    @Action
    public void ex2() {
        JFileChooser fc = createFileChooser("Selecciona el archivo de tareas");
        int option = fc.showOpenDialog(this);
        if(option != JFileChooser.CANCEL_OPTION) {
            if(fc.getSelectedFile().exists()) {
                this.tx2.setText(fc.getSelectedFile().getName());
                control.setArchivo(2, fc.getSelectedFile());
            }
        }
    }

    @Action
    public void ex3() {
        JFileChooser fc = createFileChooser("Selecciona el archivo de tractocamiones");
        int option = fc.showOpenDialog(this);
        if(option != JFileChooser.CANCEL_OPTION) {
            if(fc.getSelectedFile().exists()) {
                this.tx3.setText(fc.getSelectedFile().getName());
                control.setArchivo(3, fc.getSelectedFile());
            }
        }
    }

    @Action
    public void ex4() {
        JFileChooser fc = createFileChooser("Selecciona el archivo de depositos");
        int option = fc.showOpenDialog(this);
        if(option != JFileChooser.CANCEL_OPTION) {
            if(fc.getSelectedFile().exists()) {
                this.tx4.setText(fc.getSelectedFile().getName());
                control.setArchivo(4, fc.getSelectedFile());
            }
        }
    }

    @Action
    public void ex5() {
        JFileChooser fc = createFileChooser("Selecciona el archivo de cargas y semiremolques");
        int option = fc.showOpenDialog(this);
        if(option != JFileChooser.CANCEL_OPTION) {
            if(fc.getSelectedFile().exists()) {
                this.tx5.setText(fc.getSelectedFile().getName());
                control.setArchivo(5, fc.getSelectedFile());
            }
        }
    }

    @Action
    public void ex6() {
        JFileChooser fc = createFileChooser("Selecciona el archivo de ciudades y depositos");
        int option = fc.showOpenDialog(this);
        if(option != JFileChooser.CANCEL_OPTION) {
            if(fc.getSelectedFile().exists()) {
                this.tx6.setText(fc.getSelectedFile().getName());
                control.setArchivo(6, fc.getSelectedFile());
            }
        }
    }


    @Action
    public void procesar() {
        this.control.procesar();
    }

    public void setEParametros(boolean t) {
        this.tini.setEnabled(t);
        this.tfin.setEditable(t);
        this.enf.setEnabled(t);
        this.mxd.setEnabled(t);
        this.mxc.setEnabled(t);
        this.mca.setEditable(t);
    }

    @Action
    public void iniciar() {
        this.control.iniciar(
                Integer.parseInt(this.tini.getText()),
                Integer.parseInt(this.tfin.getText()),
                Double.parseDouble(this.enf.getText()),
                Integer.parseInt(this.mxd.getText()),
                Integer.parseInt(this.mxc.getText()),
                Integer.parseInt(this.mca.getText()));
    }

    private JFileChooser createFileChooser(String name) {
        JFileChooser fc = new JFileChooser();
        fc.setDialogTitle(name);
        return fc;
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        tx1 = new javax.swing.JTextField();
        ex1 = new javax.swing.JButton();
        jLabel2 = new javax.swing.JLabel();
        tx2 = new javax.swing.JTextField();
        ex2 = new javax.swing.JButton();
        jLabel3 = new javax.swing.JLabel();
        tx3 = new javax.swing.JTextField();
        ex3 = new javax.swing.JButton();
        jLabel4 = new javax.swing.JLabel();
        tx4 = new javax.swing.JTextField();
        ex4 = new javax.swing.JButton();
        jLabel5 = new javax.swing.JLabel();
        tx5 = new javax.swing.JTextField();
        ex5 = new javax.swing.JButton();
        procesar = new javax.swing.JButton();
        jLabel12 = new javax.swing.JLabel();
        tx6 = new javax.swing.JTextField();
        ex6 = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        tini = new javax.swing.JTextField();
        tfin = new javax.swing.JTextField();
        enf = new javax.swing.JTextField();
        jLabel9 = new javax.swing.JLabel();
        mxd = new javax.swing.JTextField();
        jLabel10 = new javax.swing.JLabel();
        mxc = new javax.swing.JTextField();
        jLabel11 = new javax.swing.JLabel();
        mca = new javax.swing.JTextField();
        iniciar = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setName("Form"); // NOI18N

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(proyecto.ProyectoApp.class).getContext().getResourceMap(VPrincipal.class);
        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel1.border.title"))); // NOI18N
        jPanel1.setName("jPanel1"); // NOI18N

        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N

        tx1.setText(resourceMap.getString("tx1.text")); // NOI18N
        tx1.setEnabled(false);
        tx1.setName("tx1"); // NOI18N

        javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(proyecto.ProyectoApp.class).getContext().getActionMap(VPrincipal.class, this);
        ex1.setAction(actionMap.get("ex1")); // NOI18N
        ex1.setText(resourceMap.getString("ex1.text")); // NOI18N
        ex1.setName("ex1"); // NOI18N
        ex1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ex1ActionPerformed(evt);
            }
        });

        jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
        jLabel2.setName("jLabel2"); // NOI18N

        tx2.setText(resourceMap.getString("tx2.text")); // NOI18N
        tx2.setEnabled(false);
        tx2.setName("tx2"); // NOI18N

        ex2.setAction(actionMap.get("ex2")); // NOI18N
        ex2.setText(resourceMap.getString("ex2.text")); // NOI18N
        ex2.setName("ex2"); // NOI18N

        jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
        jLabel3.setName("jLabel3"); // NOI18N

        tx3.setText(resourceMap.getString("tx3.text")); // NOI18N
        tx3.setEnabled(false);
        tx3.setName("tx3"); // NOI18N

        ex3.setAction(actionMap.get("ex3")); // NOI18N
        ex3.setText(resourceMap.getString("ex3.text")); // NOI18N
        ex3.setName("ex3"); // NOI18N

        jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
        jLabel4.setName("jLabel4"); // NOI18N

        tx4.setText(resourceMap.getString("tx4.text")); // NOI18N
        tx4.setEnabled(false);
        tx4.setName("tx4"); // NOI18N

        ex4.setAction(actionMap.get("ex4")); // NOI18N
        ex4.setText(resourceMap.getString("ex4.text")); // NOI18N
        ex4.setName("ex4"); // NOI18N

        jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
        jLabel5.setName("jLabel5"); // NOI18N

        tx5.setText(resourceMap.getString("tx5.text")); // NOI18N
        tx5.setEnabled(false);
        tx5.setName("tx5"); // NOI18N

        ex5.setAction(actionMap.get("ex5")); // NOI18N
        ex5.setText(resourceMap.getString("ex5.text")); // NOI18N
        ex5.setName("ex5"); // NOI18N

        procesar.setAction(actionMap.get("procesar")); // NOI18N
        procesar.setText(resourceMap.getString("procesar.text")); // NOI18N
        procesar.setName("procesar"); // NOI18N

        jLabel12.setText(resourceMap.getString("jLabel12.text")); // NOI18N
        jLabel12.setName("jLabel12"); // NOI18N

        tx6.setEditable(false);
        tx6.setText(resourceMap.getString("tx6.text")); // NOI18N
        tx6.setEnabled(false);
        tx6.setName("tx6"); // NOI18N

        ex6.setAction(actionMap.get("ex6")); // NOI18N
        ex6.setText(resourceMap.getString("ex6.text")); // NOI18N
        ex6.setName("ex6"); // NOI18N

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jLabel12)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(tx6))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jLabel5)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(tx5))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jLabel4)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(tx4))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jLabel3)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(tx3))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jLabel1)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(tx1, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jLabel2)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(tx2)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(ex6, javax.swing.GroupLayout.DEFAULT_SIZE, 77, Short.MAX_VALUE)
                            .addComponent(ex5, javax.swing.GroupLayout.DEFAULT_SIZE, 77, Short.MAX_VALUE)
                            .addComponent(ex4, javax.swing.GroupLayout.DEFAULT_SIZE, 77, Short.MAX_VALUE)
                            .addComponent(ex3, javax.swing.GroupLayout.DEFAULT_SIZE, 77, Short.MAX_VALUE)
                            .addComponent(ex2, javax.swing.GroupLayout.DEFAULT_SIZE, 77, Short.MAX_VALUE)
                            .addComponent(ex1, javax.swing.GroupLayout.DEFAULT_SIZE, 77, Short.MAX_VALUE)))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addGap(323, 323, 323)
                        .addComponent(procesar, javax.swing.GroupLayout.DEFAULT_SIZE, 91, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(tx1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(ex1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(tx2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(ex2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(tx3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(ex3))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(tx4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(ex4))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(tx5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(ex5))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel12)
                    .addComponent(tx6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(ex6))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 21, Short.MAX_VALUE)
                .addComponent(procesar)
                .addContainerGap())
        );

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel2.border.title"))); // NOI18N
        jPanel2.setName("jPanel2"); // NOI18N

        jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N
        jLabel6.setName("jLabel6"); // NOI18N

        jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N
        jLabel7.setName("jLabel7"); // NOI18N

        jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N
        jLabel8.setName("jLabel8"); // NOI18N

        tini.setText(resourceMap.getString("tini.text")); // NOI18N
        tini.setName("tini"); // NOI18N

        tfin.setText(resourceMap.getString("tfin.text")); // NOI18N
        tfin.setName("tfin"); // NOI18N

        enf.setText(resourceMap.getString("enf.text")); // NOI18N
        enf.setName("enf"); // NOI18N

        jLabel9.setText(resourceMap.getString("jLabel9.text")); // NOI18N
        jLabel9.setName("jLabel9"); // NOI18N

        mxd.setText(resourceMap.getString("mxd.text")); // NOI18N
        mxd.setName("mxd"); // NOI18N

        jLabel10.setText(resourceMap.getString("jLabel10.text")); // NOI18N
        jLabel10.setName("jLabel10"); // NOI18N

        mxc.setText(resourceMap.getString("mxc.text")); // NOI18N
        mxc.setName("mxc"); // NOI18N

        jLabel11.setText(resourceMap.getString("jLabel11.text")); // NOI18N
        jLabel11.setName("jLabel11"); // NOI18N

        mca.setText(resourceMap.getString("mca.text")); // NOI18N
        mca.setName("mca"); // NOI18N

        iniciar.setAction(actionMap.get("iniciar")); // NOI18N
        iniciar.setText(resourceMap.getString("iniciar.text")); // NOI18N
        iniciar.setName("iniciar"); // NOI18N

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(iniciar, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(jLabel6)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(tini, javax.swing.GroupLayout.DEFAULT_SIZE, 109, Short.MAX_VALUE))
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(jLabel7)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(tfin, javax.swing.GroupLayout.DEFAULT_SIZE, 117, Short.MAX_VALUE))
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(jLabel8)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(enf, javax.swing.GroupLayout.DEFAULT_SIZE, 72, Short.MAX_VALUE)))
                        .addGap(8, 8, 8)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(jLabel9)
                                .addGap(2, 2, 2))
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jLabel11)
                                    .addComponent(jLabel10))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(mca, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 127, Short.MAX_VALUE)
                            .addComponent(mxc, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 127, Short.MAX_VALUE)
                            .addComponent(mxd, javax.swing.GroupLayout.DEFAULT_SIZE, 127, Short.MAX_VALUE))))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(tini, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(mxd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel9))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel7)
                    .addComponent(tfin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(mxc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel10))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel8)
                    .addComponent(enf, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(mca, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel11))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(iniciar)
                .addContainerGap())
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void ex1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ex1ActionPerformed
    }//GEN-LAST:event_ex1ActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextField enf;
    private javax.swing.JButton ex1;
    private javax.swing.JButton ex2;
    private javax.swing.JButton ex3;
    private javax.swing.JButton ex4;
    private javax.swing.JButton ex5;
    private javax.swing.JButton ex6;
    private javax.swing.JButton iniciar;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JTextField mca;
    private javax.swing.JTextField mxc;
    private javax.swing.JTextField mxd;
    private javax.swing.JButton procesar;
    private javax.swing.JTextField tfin;
    private javax.swing.JTextField tini;
    private javax.swing.JTextField tx1;
    private javax.swing.JTextField tx2;
    private javax.swing.JTextField tx3;
    private javax.swing.JTextField tx4;
    private javax.swing.JTextField tx5;
    private javax.swing.JTextField tx6;
    // End of variables declaration//GEN-END:variables
}
